package com.pulse.base.service;

import com.pulse.base.domain.CircuitMeasure;
import com.pulse.base.domain.JobDispatch;
import com.pulse.base.domain.vo.ParamVo;

import java.util.List;

public interface IJobDispatchService {

    /**
     * 启动测试
     * @param circuitMeasure
     * @return
     */
    CircuitMeasure startTest(CircuitMeasure circuitMeasure);

    /**
     * 更新周期测试任务
     * @param jobDispatch
     * @return
     */
    int updateJobDispatch(JobDispatch jobDispatch);

    /**
     * 添加周期测试任务
     * @param jobDispatch
     * @return
     */
    int insertJobDispatch(JobDispatch jobDispatch);

    /**
     * 根据设备编号查询
     * @param deviceNo
     * @return
     */
    List<JobDispatch> selectByDeviceNo(String deviceNo);

    /**
     * 根据设备编号和通道号查询
     * @param deviceNo
     * @param channel
     * @return
     */
    JobDispatch selectByDeviceNoAndChannel(String deviceNo, Long channel);

    /**
     * 根据设备编号删除
     * @param deviceNo
     * @return
     */
    int deleteJobDispatchByDeviceNo(String deviceNo);

    /**
     * 查询任务列表
     * @param jobDispatch
     * @return
     */
    List<JobDispatch> selectJobDispathList(JobDispatch jobDispatch);

    /**
     * 批量修改cron表达式
     * @param paramVo
     * @return
     */
    int setCron(ParamVo paramVo);
}
